<template>
  <div class="shareItem">
    <div class="expItems">
      <div class="expTitle">{{ item.title }}</div>
      <div class="expContent">
        {{ item.content }}
      </div>
      <div class="expBottom">
        <img :src="item.author.avatar" alt="" />
        <span class="expName">{{ item.author.nickname }}</span>
        <span class="expTime">{{ item.created_at | formatTime }}</span>
        <div class="expComment">
          <i class="iconfont icon-icon_pinglun"></i>
          <span>{{ item.article_comments }}</span>
        </div>
        <div class="expZan">
          <i class="iconfont icon-icon_dianzanliang"></i>
          <span>{{ item.star }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['item']
}
</script>

<style lang="less" scoped>
.shareItem {
  .expItems {
    padding: 16px 18px 28px 18px;
    .expTitle {
      font-size: 16px;
    }
    .expContent {
      font-size: 14px;
      padding-top: 10px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .expBottom {
      padding-top: 20px;
      font-size: 10px;
      display: flex;
      align-items: center;
      color: #ccc;
      img {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        margin-right: 10px;
      }
      .expName {
        font-size: 10px;
        flex: 1;
      }
      .expTime {
        padding-right: 20px;
      }
      .expComment {
        display: flex;
        align-items: center;
        margin-right: 20px;
        .icon-icon_pinglun {
          padding-right: 8px;
        }
      }
      .expZan {
        display: flex;
        align-items: center;
        .icon-icon_dianzanliang {
          padding-right: 8px;
        }
      }
    }
  }
}
</style>
